import cv2
import matplotlib.pyplot as plt
img=cv2.imread('CV-Pictures/gate.jpg')
plt.figure('hpu-zji-tsinghua')
plt.hist(img.ravel(),bins=64)

plt.show()
cv2.imshow('img',img)
cv2.waitKey()
cv2.destroyAllWindows()